/*
 * This file uses Timer 0(8 bit) and Timer 1(16 bit)
 * as delay timer.
 * Method: Output Compare
 *
 * delay()  1 cycle = 100 ns
 * delay2() 1 cycle = 102 us
 */

#ifndef _timer_H_
#define _timer_H_

#include <avr/io.h>

extern uint16_t Seconds;
extern uint16_t TimeOut;
extern uint8_t  ReadVoltage_delay;
extern uint8_t One_Second;

extern void timer_init(void); //Iitialize Timer 0 and Timer 1

extern void delay(uint8_t cycle); //Use Timer 0; 1 cycle = 102 us

extern void delay_ns(uint8_t cycle); //Use Timer 2; 1 cycle = 100 ns

extern void Wait_2_sec(void); //Display Welcome screen for 2 sec

extern void Wait_1_sec(void);


#endif
